﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace CSP.Web.UserControls
{
    public partial class TopSearch : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Btn_Search_Click(object sender, EventArgs e)
        {
            SearchData();
        }

        private void SearchData()
        {
            if (this.Txt_SearchValue.Value == "")
            {
                this.Txt_SearchValue.Value = Txt_DefaultSearchValue.Value;
            }

            Response.Redirect("~/Service/Search.aspx?SearchValue=" + Server.UrlEncode(this.Txt_SearchValue.Value));
        }
    }
}